package com.gangkou_back.controller;

import com.gangkou_back.entity.User;
import com.gangkou_back.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class testController {

    @Autowired
    UserService userService;

    @GetMapping("/list")
    public String read() {
        return "nb";
    }

    @GetMapping("/select")
    public List<User> select() {
        return userService.list();
    }
}
